package com.tiger.cmpeb.sample5;

import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;

public class Client {
	public static void main(String args[]) {
		try {
			InitialContext ctx = new InitialContext();
			Object obj = ctx.lookup("comp/env/ejb/TestBean01");
			TestHome01 testHome = (TestHome01) PortableRemoteObject.narrow(obj, TestHome01.class);
			ctx.close();

			Test01 test = testHome.create();
			test.insertData();
			test.test();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
